<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
/* 取得订单号 */
$order_sn = trim(addslashes($out_trade_no));
/*判断订单类型*/
if(preg_match ("/S-P[0-9]+RN[0-9]/",$order_sn)) {
    //检查支付金额是否相符
    $row = $dsql->GetOne("SELECT * FROM #@__shops_orders WHERE oid = '{$order_sn}'");
	$row['money'] = $row['priceCount'];
}else if (preg_match ("/M[0-9]+T[0-9]+RN[0-9]/", $order_sn)){
    $row = $dsql->GetOne("SELECT * FROM #@__member_operation WHERE buyid = '{$order_sn}'");
} else {
        $row['money'] = $total_fee;
    if(strlen($order_sn)==4){
        echo "<script>top.layer.msg('支付成功！',{icon: 1,time:1000},function() {
  top.location.reload()
});</script>";
        exit();
    }
}
?>
<html>
<head>
    <meta charset="UTF-8">
    <title>成功支付</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<script type="text/javascript" src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<style type="text/css">
*{margin:0;padding:0;}
body{background:#f5f5f5;font-size:14px;color:#333;font-family:"Microsoft Yahei","微软雅黑","MicrosoftJhengHei","华文细黑","Hiragino Sans GB","sans-serif";}
ul,li{list-style:none;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
i,em{font-style:normal;}
img{border:0;}
a{text-decoration:none;color:#333;}
a:hover{text-decoration:none;color:#23b8ff;}
.container{max-width:1000px;min-width:320px;margin:0 auto;}
.clearfix:after{content:"\200b";display:block;height:0;clear:both;}

/*所有浏览器通用头部*/
.hd-main{background-color:#fff;margin-bottom:20px;}
.ep-logo{float:left;}
.ep-logo img{display:block;}
.ep-hd-info{padding:10px 0;}
.ep-order-status{float:left;padding-left:20px;border-left:1px solid #f0f0f0;line-height:20px;font-size:16px;font-weight:700;margin-top:10px;}

/*IE8浏览器 不支持CSS3代码样式*/
/*支付成功反馈信息*/
.ep-wp-hd{padding:22px 135px;background:#f5fef3;}
.ep-status{font-size:18px;color:#1e1e1e;padding:20px 0;zoom:1;clear:both;border:none;overflow:hidden;}
.ep-status span{float:left;line-height:25px;}
.ep-status span.ep-icon{margin-right:8px;}
.ep-icon-success{background-position:0 0;}
.ep-icon-success{width:23px;height:23px;}
.ep-icon{background-image:url(img/ep_new_sprites.png);background-repeat:no-repeat;display:block;}
.ep-status-success .mod-it-text{font-weight:700;}
.ep-status span{float:left;line-height:25px;}

/*订单信息*/
.text-center{background-color:#fff;padding:40px 135px 16px 135px;}
.text-center h2{line-height:26px;color:#23b8ff;font-size:18px;}
.text-center p{line-height:26px;color:#333;font-size:16px;padding-bottom:20px;}
.text-center p em{color:#e81515;}

/*返回首页*/
.text-center2{background-color:#fff;padding:0 0 56px 135px;}
.text-center2 a{width:130px;height:50px;line-height:50px;background-color:#4580cb;border:1px solid #3875c1;color:#fff;font-size:16px;display:inline-block;text-align:center;border-radius:2px;}
.text-center2 a:hover{background-color:#4495de;}


/*PC端浏览器1200px分辨率*/
/*支付成功反馈信息*/
@media screen and (min-width:1000px)
{.ep-wp-hd{padding:22px 135px;background:#f5fef3;}
.ep-status{font-size:18px;color:#1e1e1e;padding:20px 0;zoom:1;clear:both;border:none;overflow:hidden;}
.ep-status span{float:left;line-height:25px;}
.ep-status span.ep-icon{margin-right:8px;}
.ep-icon-success{background-position:0 0;}
.ep-icon-success{width:23px;height:23px;}
.ep-icon{background-image:url(img/ep_new_sprites.png);background-repeat:no-repeat;display:block;}
.ep-status-success .mod-it-text{font-weight:700;}
.ep-status span{float:left;line-height:25px;}

/*订单信息*/
.text-center{background-color:#fff;padding:40px 135px 16px 135px;}
.text-center h2{line-height:26px;color:#23b8ff;font-size:18px;}
.text-center p{line-height:26px;color:#333;font-size:16px;padding-bottom:20px;}
.text-center p em{color:#e81515;}

/*返回首页*/
.text-center2{background-color:#fff;padding:0 0 56px 135px;}
.text-center2 a{width:130px;height:50px;line-height:50px;background-color:#4580cb;border:1px solid #3875c1;color:#fff;font-size:16px;display:inline-block;text-align:center;border-radius:2px;}
.text-center2 a:hover{background-color:#4495de;}}


/*移动端浏览器320px分辨率*/
/*支付成功反馈信息*/
@media only screen and (min-width:320px) and (max-width:767px)
{.ep-wp-hd{padding:22px 30px;background:#f5fef3;}
.ep-status{font-size:18px;color:#1e1e1e;padding:20px 0;zoom:1;clear:both;border:none;overflow:hidden;}
.ep-status span{float:left;line-height:25px;}
.ep-status span.ep-icon{margin-right:8px;}
.ep-icon-success{background-position:0 0;}
.ep-icon-success{width:23px;height:23px;}
.ep-icon{background-image:url(img/ep_new_sprites.png);background-repeat:no-repeat;display:block;}
.ep-status-success .mod-it-text{font-weight:700;}
.ep-status span{float:left;line-height:25px;}

/*订单信息*/
.text-center{background-color:#fff;padding:40px 30px 16px 30px;}
.text-center h2{line-height:26px;color:#23b8ff;font-size:18px;}
.text-center p{line-height:26px;color:#333;font-size:16px;padding-bottom:20px;}
.text-center p em{color:#e81515;}

/*返回首页*/
.text-center2{background-color:#fff;padding:0 0 56px 30px;}
.text-center2 a{width:130px;height:50px;line-height:50px;background-color:#4580cb;border:1px solid #3875c1;color:#fff;font-size:16px;display:inline-block;text-align:center;border-radius:2px;}
.text-center2 a:hover{background-color:#4495de;}}
</style>
</head>
<body>

<!-- 头部 -->
<div class="hd-main">
<div class="container ep-hd-info clearfix">
<div class="ep-logo"><img src="img/pay-logo.png"></div>
<div class="ep-order-status">订单支付</div>
</div>
</div>
<!-- 头部 End -->

<div class="container">

<div class="ep-wp-hd">
<h2 class="ep-status ep-status-success mod-it">
<span class="ep-icon ep-icon-success mod-it-icon"></span>
<span class="mod-it-text">支付成功！</span>
</h2>
</div>

<div class="text-center">
<p>商品订单：<?php echo $out_trade_no?></p>
<p>支付金额：<em>￥<?php echo $row['money']?></em></p>
</div>
<div class="text-center2"><a href="javascript:window.top.location.href='<?php echo $cfg_basehost.$cfg_cmspath?>';">返回首页</a></div>
</div>
</body>
</html>